package net.xgs.rbac.controller;


import com.alibaba.fastjson.JSON;
import net.xgs.rbac.annotations.ClearNoLogin;
import net.xgs.rbac.annotations.NoLogin;
import net.xgs.rbac.config.RouteVo;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;


@RestController
@RequestMapping("/resource")
@NoLogin
public class ResourceController {


    @GetMapping("/")
    public String index(){
        return "";
    }

    @ClearNoLogin
    @GetMapping("/ebbc")
    public String index2(){
        return "";
    }

    @PutMapping("/put")
    public String put(@RequestBody String str){
        System.out.println(str);
        return str;
    }

    @PutMapping("/put2")
    public String put2(@RequestParam("a") String str){
        System.out.println(str);
        Map<String,String> map = new HashMap<>();
        map.put("a",str);
        return JSON.toJSONString(map);
    }
}
